package com.modxiageasyh.coroutinedemolibrary

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.fragment.findNavController
import kotlinx.android.synthetic.main.activity_coroutine.*
import kotlinx.coroutines.*

/**
 * 协程
 * https://juejin.cn/post/6950616789390721037
 */
class CoroutinesActivity : AppCompatActivity() {
    private val mScope = MainScope()
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_coroutine)
        toolbar.setNavigationOnClickListener {
            if (!clNavHostFragment.findNavController().popBackStack()) finish()
        }



    }



}